<template>
    <RouterView></RouterView>
    <div
        class="right-main"
        v-if="!(router.currentRoute.value.path == '/trainroom/mytrainroom/detialall')"
    >
        <div class="main-top" v-if="isshowtop">
            <div class="header">
                <div class="title">
                    湖北 考区7-12级《中国民族民间舞蹈等级考试女生版教材》 教学研讨公益课
                </div>
                <div class="back">返回</div>
            </div>
            <div class="tip">
                <img class="img" src="" alt="" />
                <div class="text">中国民族民间舞考级中心</div>
                <div class="time">创建于2021-11-19</div>
            </div>
        </div>

        <div class="right-bottom">
            <div class="entirety">
                <div class="entirety-item" v-for="item in initData" :key="item.id">
                    <div class="entirety">
                        <div class="entir">
                            <div class="divimg">
                                <img :src="item.pic" />
                                <!-- <img
                                    class="onicon"
                                    src="https://rs.dance365.com/img/release_play@3x.fb313c4d.png"
                                /> -->
                            </div>
                            <div class="text">
                                <router-link
                                    class="textdance"
                                    :to="`/trainroom/mytrainroom/detialall?id=${item.id}`"
                                >
                                    {{ item.name }}
                                </router-link>
                                <!-- <div class="textdance">
                                    {{ item.name }}
                                </div> -->
                                <div class="works">未开始</div>

                                <!-- <div class="author">
                                    <div class="head-portrait">
                                        <img src="../../../../../public/OIP-C (1).jpg" alt="" />
                                    </div>
                                    <div class="headertext">仰光zxp</div>
                                </div> -->
                            </div>
                        </div>
                    </div>
                    <!-- <div class="btn">开始练习</div> -->
                    <div class="allstart">
                        <div class="onicon"></div>
                        <div class="start">进行中</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';
import useTrainroomStore from '@/store/modules/trainroom';
import router from '@/router';
const TrainroomStore = useTrainroomStore();
const isshowtop = ref(false);
const props = defineProps(['istrainc']);
const initData = computed(() => {
    // console.log(TrainroomStore.initdata);
    return TrainroomStore.initdatacom;
});
</script>

<style scoped lang="less">
.right-main {
    width: calc(1200px - 180px);
    // background-color: aquamarine;
    height: 300px;
    .main-top {
        padding: 30px;
        border-radius: 4px;
        background-color: #fff;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        .header {
            width: 100%;
            display: flex;
            color: #111;
            align-items: center;
            justify-content: space-between;
            .title {
                font-size: 24px;
            }
            .back {
                cursor: pointer;
                font-size: 14px;
                width: 80px;
                text-align: righ;
            }
        }
        .tip {
            display: flex;
            margin-top: 24px;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            height: 28px;
            font-size: 16px;
            .img {
                width: 28px;
                height: 28px;
                margin-right: 10px;
                border-radius: 100%;
                background-size: cover;
                background-repeat: no-repeat;
                background-position: 50%;
                cursor: pointer;
                font-size: 16px;
            }
            .text {
                font-size: 16px;
            }
            .time {
                font-size: 14px;
                color: #666;
                padding: 0 0 0 20px;
            }
        }
    }
    .right-bottom {
        overflow: hidden;
        padding: 0 30px 10px;
        background-color: #fff;
        margin-bottom: 20px;
        border-radius: 4px;
        margin-top: 10px;
        .entirety {
            width: 936px;
            // height: 138px;
            // background-color: pink;
            margin-top: 10px;
            box-sizing: border-box;
            .entirety-item {
                width: 100%;
                height: 138px;
                display: flex;
                background-color: #fff;
                // justify-content: space-around;
                align-items: center;
                border-bottom: 1px solid #7d8090;
                &:hover {
                    background-color: #ebeef5;
                }
                .entirety {
                    width: 680px;
                    .entir {
                        width: 680px;
                        height: 121px;
                        display: flex;
                        .divimg {
                            cursor: pointer;
                            position: relative;
                            width: 169px;
                            height: 101px;
                            box-sizing: border-box;
                            img {
                                align-items: center;
                                position: relative;
                                width: 169px;
                                height: 101px;
                                border-radius: 4px;
                                background-size: cover;
                                background-position: 50%;
                                justify-content: center;
                                -webkit-box-align: center;
                                display: flex;
                                -webkit-box-pack: center;
                            }
                            .onicon {
                                position: absolute;
                                bottom: 6px;
                                left: 10px;
                                width: 30px;
                                height: 30px;
                            }
                        }
                        .text {
                            height: 101px;
                            padding: 4px 0 0;
                            display: flex;
                            flex-direction: column;
                            justify-content: space-between;
                            padding-left: 17px;
                            font-size: 16px;
                            color: #111;
                            box-sizing: border-box;
                            .textdance {
                                cursor: pointer;
                                width: 543px;
                                font-weight: 700;
                                font-size: 16px;
                                text-decoration: none;
                                outline: none;
                                color: #000;
                            }
                            .works {
                                // font-size: 14px;
                                // color: rgb(125, 128, 144);
                                // white-space: normal;
                                // word-break: break-all;
                                // line-height: 23px;

                                font-size: 14px;
                                color: #b1b5c1;
                                -webkit-box-align: center;
                                -ms-flex-align: center;
                                align-items: center;
                                margin-bottom: 30px;
                            }
                            .author {
                                display: flex;
                                -webkit-box-align: center;
                                align-items: center;
                                box-sizing: border-box;
                                font-size: 16px;
                                color: #111;
                                .head-portrait {
                                    cursor: pointer;
                                    img {
                                        width: 30px;
                                        height: 30px;
                                        border-radius: 50%;
                                        margin-right: 11px;
                                        background-size: cover;
                                        background-position: 50%;
                                    }
                                }
                                .headertext {
                                    cursor: pointer;
                                }
                            }
                        }
                    }
                }
                .btn {
                    cursor: pointer;
                    width: 96px;
                    height: 40px;
                    line-height: 40px;
                    color: rgb(240, 234, 234);
                    font-size: 16px;
                    text-align: center;
                    border-radius: 4px;
                    margin-left: 130px;
                    // display: none;
                    &:hover {
                        background: #f93684;
                    }
                }
                .allstart {
                    .onicon {
                        width: 30px;
                        height: 30px;
                        // background-color: pink;
                        margin-left: 133px;
                    }
                    .start {
                        font-size: 16px;
                        margin-left: 130px;
                    }
                }
            }
        }
    }
}
</style>
